package govenor.updater;

import govenor.manager.GovenorManager;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class GovenorUpdater {

	private int NUMBER_OF_UPDATE_THREADS = 1;
	private int UPDATE_CHECK_PERIOD = 25 ;
	private GovenorManager govManager;
	private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(NUMBER_OF_UPDATE_THREADS);
	
	public GovenorUpdater(GovenorManager manager) {
		this.govManager = manager;
		scheduler.scheduleAtFixedRate(new GovenorUpdateHandler(this.govManager), 10, UPDATE_CHECK_PERIOD, TimeUnit.SECONDS);
	}
	
	
}
